$(function () {
    vm.loadInfo();
});
var vm = new Vue({
    el: '#rrapp',
    data : {
        scoreRes : [],
        msg : ''
    },
    methods: {
        loadInfo : function () {
            $.ajax({
                url: "../admin/program_info?t=" + $.now(),
                type: 'get',
                success : function (result){
                    vm.scoreRes = result.scoreRes;
                },
                complete:function(){
                    vm.loadInfo();
                }
            });
        },
        removeSys : function () {
            $.ajax({
                url: "../admin/removeAllProgram",
                type: 'post',
                contentType:"application/json;charset=UTF-8",
                success : function (result) {
                    vm.msg = result.msg;
                    alert(result.msg);
                }
            });
        }
    }
});